package com.kee.server.manager.dao;

import java.sql.SQLException;
import java.util.Date;

import com.kee.server.dao.BaseDao;
import com.kee.server.manager.bean.Content;

public class ContentDaoImpl extends BaseDao implements IContentDao {

	
	public int add(Content content) throws SQLException {
		Object a = sqlMapClientImport.insert("addContent", content);
		return (Integer) a;
	}

	public static void main(String[] args) {
		ContentDaoImpl cd = new ContentDaoImpl();
		Content c = new Content();
		c.setChannel_id(11);
		c.setUser_id(1);
		c.setType_id(1);
		c.setModel_id(1);
		c.setSort_date(new Date());
		c.setTop_level(0);
		c.setHas_title_img(0);
		c.setComments_day(0);
		c.setDownloads_day(0);
		c.setIs_recommend(0);
		c.setViews_day(0);
		c.setUps_day(0);
		c.setStatus(2);
		c.setSite_id(1);
		try {
			System.out.println(cd.add(c));
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
}
